package cn.stylefeng.guns.modular.business.service;

import cn.stylefeng.guns.modular.business.entity.ReadMessage;
import cn.stylefeng.guns.modular.business.model.params.ReadMessageDTO;
import cn.stylefeng.guns.modular.business.model.result.MessageNumResult;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 已读消息表 服务类
 * </p>
 *
 * @author
 * @since 2019-07-30
 */
public interface ReadMessageService extends IService<ReadMessage> {

    /**
     * 新增
     *
     * @author
     * @Date 2019-07-30
     */
    void add(ReadMessageDTO param, Long userId);

    /**
     * 标记所有未读为已读
     *
     * @param userId
     */
    void addAllUnreadItem(Long userId);


    /**
     * 获取未读消息数量
     * @param userId
     * @return
     */
    MessageNumResult getUnReadNum(Long userId);
}
